# Contributor: Rabindra Dhakal <contact@qaidvoid.dev>
# Maintainer: Rabindra Dhakal <contact@qaidvoid.dev>
pkgname=hyprlang
pkgver=0.5.0
pkgrel=0
pkgdesc="The official implementation library for the hypr config language."
url="https://hyprland.org/hyprlang/"
arch="all"
license="LGPL-3.0-only"
makedepends="cmake"
subpackages="$pkgname-doc"
source="$pkgname-$pkgver.tar.gz::https://github.com/hyprwm/hyprlang/archive/v$pkgver.tar.gz"

build() {
	cmake -B build \
		-DCMAKE_BUILD_TYPE=MinSizeRel \
		-DCMAKE_INSTALL_PREFIX=/usr
	cmake --build build
}

check() {
	ctest --test-dir build --output-on-failure
}

package() {
	DESTDIR="$pkgdir" cmake --install build

	install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
}

sha512sums="
9e80b936d977d46f9c1a0fc4733c89fb1cf521c767295891427f1ab358f8373839db3fad823f8abfca9d344350813361504f70aa3f6e109b523ab8ec2c3fa833  hyprlang-0.5.0.tar.gz
"
